package com.ty.entity;
// Generated 2018-9-14 9:06:51 by Hibernate Tools 4.3.5.Final

import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * SysMenus generated by hbm2java
 */
@Entity
@Table(name = "sys_menus", catalog = "autha_manager")
public class SysMenus implements java.io.Serializable {

	private Long id;
	private SysMenus sysMenus;
	private String name;
	private String code;
	private String url;
	private String remark;
	private Integer orderSort;
	private Integer status;
	
	@Column(name="status")
	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Transient
	public List<SysMenus> getMensDataList() {
		return mensDataList;
	}

	public void setMensDataList(List<SysMenus> mensDataList) {
		this.mensDataList = mensDataList;
	}

	private List<SysMenus> mensDataList;
	
	@Column(name="order_sort")
	public Integer getOrderSort() {
		return orderSort;
	}

	public void setOrderSort(Integer orderSort) {
		this.orderSort = orderSort;
	}

	@Column(name="icon")
	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	private String icon;
	
	private Set<SysMenus> sysMenuses = new HashSet<SysMenus>(0);

	public SysMenus() {
	}

	public SysMenus(SysMenus sysMenus, String name, String code, String url, String remark, Set<SysMenus> sysMenuses) {
		this.sysMenus = sysMenus;
		this.name = name;
		this.code = code;
		this.url = url;
		this.remark = remark;
		this.sysMenuses = sysMenuses;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "pid")
	public SysMenus getSysMenus() {
		return this.sysMenus;
	}

	public void setSysMenus(SysMenus sysMenus) {
		this.sysMenus = sysMenus;
	}

	@Column(name = "name", length = 200)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "code")
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "url", length = 200)
	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Column(name = "remark", length = 65535)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "sysMenus")
	public Set<SysMenus> getSysMenuses() {
		return this.sysMenuses;
	}

	public void setSysMenuses(Set<SysMenus> sysMenuses) {
		this.sysMenuses = sysMenuses;
	}

}
